package field_method06;

import java.util.Scanner;

public class UserTest {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入你的用户名:");
        String userName =scanner.next();
        System.out.println("请输入你的密码:");
        String password = scanner.next();
        User user=new User();
        boolean res=user.login(userName,password);
        if (res){
            System.out.println("登录成功，欢迎"+userName);
        }else {
            System.out.println("登录失败,用户名或密码错误!");

        }
    }
}
